﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenLS.UI.ViewModels
{
    public class DialogWindowViewModel : INotifyPropertyChanged
    {
        public DialogWindowViewModel()
        {
            _showsFront = true;
        }

        private bool _showsFront;
        public bool ShowsFront
        {
            get
            {
                return _showsFront;
            }
            set
            {
                _showsFront = value;
                Notify("ShowsFront");
            }
        }

        public bool ShowsWaitingMessage { get; set; }

        public int BackScreenIndex
        {
            get { return ShowsWaitingMessage == true ? 1 : 0; }
        }

        private void Notify(params string[] propertyNames)
        {
            if (PropertyChanged != null)
            {
                foreach (string propertyName in propertyNames)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }
}
